#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
using namespace std;


int main1()
{
	long long x, y;
	cin >> x;

	long long ret = sqrt(x);

	long long x1 = ret * ret, x2 = (ret + 1) * (ret + 1);

	if (x - x1 < x2 - x)
	{
		cout << x1;
	}
	else
	{
		cout << x2;
	}

	return 0;
}


int main()
{
	main1();


	return 0;
}